<?php  
class FckHelper extends Helper 
{ 
	 var $Width=550;
	 var $Height=550;
     function load($id, $toolbar = 'Default') { 
         $did='';
         foreach (explode('/', $id) as $v) { 
             $did .= ucfirst($v); 
         } 

         //如果你的没有 ucfirst() （我的就没有 没办法）这个函数就把那些注释掉像下面写啊

        //foreach (explode('/', $id) as $v) { 
        //      $did .= ucfirst($v); 
        // } 
        $did = 'my_Editor1'; //其中'textarea_id' 为你的编辑框的ID   呵呵
         return $FCK_CODE ="
<script type=\"text/javascript\"> 
fckLoader_$did = function () { 
     var bFCKeditor_$did = new FCKeditor('$did'); 
     bFCKeditor_$did.BasePath = '/js/'; 
     bFCKeditor_$did.ToolbarSet = '$toolbar'; 
     bFCKeditor_$did.Width = $this->Width;
	 bFCKeditor_$did.Height = $this->Height;
     bFCKeditor_$did.ReplaceTextarea(); 
} 
fckLoader_$did(); 
</script> ";

     } 
} 
?> 
